home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / 422mods.zip / ZYCOR01.422 < prev   
Text File  |  1993-03-05  |  6KB  |  158 lines

  1. Zycor01.mod or BD001x.mod or Whatever
  2. Zycor #1 @9666
  3. Sun Feb 28 09:17:31 1993
  4. ┌───────────────────────────────────────────────────────────────────────────┐
  5. │ Mod Name: Zycor01.mod       Mod Author: Zycor                             │
  6. │ Difficulty: Simple!               Date: February 28, 1993                 │
  7. │ WWIV Version: 4.22                                                        │
  8. │ Files Affected: BBS.C                                                     │
  9. │ Description: A new void sublist() that shows the gold value of a post!    │
  10. │              Now supports non-ansi Users. -Zy.                            │
  11. │ Posted on  : ICEnet - WWIVnet                                             │
  12. └───────────────────────────────────────────────────────────────────────────┘
  13. It always irritates me that people write mods, and completely leave out
  14. the non-ansi users.  I don't have many, but I think they should be taken
  15. care of.  Not to mention most of my non-ansi users are long distance and
  16. are not using the ansi to save time.  So I rewrote this mod, and am
  17. releasing it as Zycor01.Mod - I really can't take credit for this, as I
  18. did nothing to the mod, it works by itself, all I did was add the
  19. non-ansi calls. But for the sake of naming the thing, you can use
  20. Zycor01.mod or BD001x.422 or whatever.
  21.                                                 -Zycor.
  22. ===========================================================================
  23.  
  24. Originally posted as:
  25. ┌───────────────────────────────────────────────────────────────────────────┐
  26. │ Mod Name: BD001a.422        Mod Author: Beats me                          │
  27. └───────────────────────────────────────────────────────────────────────────┘
  28.  
  29. For got who wrote this but all I did was debug it and add the ability for
  30. Gold.  Before installing this replace all the ^C with heart codes and select
  31. your colors as well. It works just replace the void sublist() in BBS.C and 
  32. compile!
  33. ===========================================================================
  34.  
  35. void sublist(void)
  36. {
  37.   int abort,i,ok,sam,tally,thissub,counter,totalmsg,newmsg;
  38.   char s[256],s1[81],c;
  39.  
  40.   goldload();
  41.  
  42.   abort=thissub=totalmsg=newmsg=0;
  43.  
  44.   pla("             ^P1──══ ^P7Sub-Message Boards Available ^P1══── ",&abort);
  45.   npr("     ^P3The ^P1* ^P3Indicates Sub included in your newscan\r\n");
  46.   nl();
  47.   npr("^P2 Num  Sub Type    Sub-Message Board Topic                  Msg New Go
  48. ld\r\n",&abort);
  49.   if(okansi())
  50.     npr("^P7╔════╦═══════════╦════════════════════════════════════════╦═══╦═══╦
  51. ═══╗\r\n",&abort);   /* Reconnect this line above */
  52.   else
  53.     npr("^P7+----+-----------+----------------------------------------+---+---+
  54. ---+\r\n",&abort);   /* Reconnect this line above */
  55.   i=0;
  56.   while ((i<num_subs) && (usub[i].subnum!=-1) && (abort==0)) {
  57.      sam=tally=0;
  58.      if (strcmp(usub[cursub].keys,usub[i].keys))
  59.         thissub=1;
  60.      else
  61.         thissub=0;
  62.      if (okansi())
  63.        sprintf(s1,"^P7║ ^P2%3s^P7║ ",usub[i].keys);
  64.      else
  65.        sprintf(s1,"^P7| ^P2%3s^P7| ",usub[i].keys);
  66.      strcpy(s,s1);
  67.  
  68.      if (qsc_q[usub[i].subnum/32]&(1L<<(usub[i].subnum%32)))
  69.         strcat(s,"^P1* ");
  70.      else
  71.         strcat(s,"  ");
  72.  
  73.   
  74.     if (net_sysnum || (net_num_max>1)) {
  75.        if (xsubs[usub[i].subnum].num_nets) {
  76.           if (xsubs[usub[i].subnum].num_nets>1) {
  77.              if (okansi())
  78.                sprintf(s1,"^P5GATED   ^P7║ ^P1");
  79.              else
  80.                sprintf(s1,"^P5GATED   ^P7| ^P1");
  81.              strcat(s,s1);
  82.           } else {
  83.              if (okansi())
  84.                sprintf(s1,"^P5%-8s^P7║ ^P1",net_networks[xsubs[usub[i].subnum].
  85. nets[0].net_num].name);    /* Reconnect this line above */
  86.              else
  87.                sprintf(s1,"^P5%-8s^P7| ^P1",net_networks[xsubs[usub[i].subnum].
  88. nets[0].net_num].name);    /* Reconnect this line above */
  89.              strcat(s,s1);
  90.           }
  91.        } else 
  92.          if (okansi())
  93.            strcat(s,"^P2Local   ^P7║ ^P1");
  94.          else
  95.            strcat(s,"^P2Local   ^P7| ^P1");
  96.     } else
  97.       if (okansi())
  98.         strcat(s,"^P2Local   ^P7║ ^P1");
  99.       else
  100.         strcat(s,"^P2Local   ^P7| ^P1");
  101.  
  102.     strcat(s,subboards[usub[i].subnum].name);
  103.     for (counter=strlen(subboards[usub[i].subnum].name); counter<39; counter++)
  104.         strcat(s," ");
  105.     if (okansi())
  106.       strcat(s,"^P7║");
  107.     else
  108.       strcat(s,"^P7|");
  109.     iscan(i);
  110.     sam=1;
  111.  
  112.     if (usub[i].subnum<num_subs)
  113.        while((sam<=nummsgs) && (msgs[sam].qscan<=qsc_p[usub[i].subnum]))
  114.        ++sam;
  115.  
  116.     tally=nummsgs-(sam-1);
  117.  
  118.     totalmsg+=nummsgs;
  119.     newmsg+=tally;
  120.  
  121.     if (okansi())
  122.       sprintf(s1,"^P3%3d^P7║^P2%3d^P7║^P2%3d^P7║",nummsgs,tally,rewardgold[usub
  123. [i].subnum]);      /* Reconnect this line above */
  124.     else
  125.       sprintf(s1,"^P3%3d^P7|^P2%3d^P7|^P2%3d^P7|",nummsgs,tally,rewardgold[usub
  126. [i].subnum]);      /* Reconnect this line above */
  127.     strcat(s,s1);
  128.  
  129.     if (thissub==1) {
  130.        thissub=0;
  131.     }
  132.     else
  133.        if (okansi())
  134.          strcat(s,"^P4ε----^P0");
  135.        else
  136.          strcat(s,"^P4<----^P0");
  137.     strcat(s,"\r\n");
  138.     npr(s);
  139.     if (inkey()!=0)
  140.        abort=1;
  141.     i++;
  142.   }
  143.   if (okansi())
  144.     npr("^P7╚════╩═══════════╩════════════════════════════════════════╩═══╩═══╩
  145. ═══╝\r\n");        /* Reconnect this line above */
  146.   else
  147.     npr("^P7+----+-----------+----------------------------------------+---+---+
  148. ---+\r\n");        /* Reconnect this line above */
  149.   npr("\r\n^P1You have a total of ^P5%-3d^P1 messages, and ^P5%-3d^P1 are new.\
  150. r\n",totalmsg,newmsg);  /* Reconnect this line above */
  151.   if (i==0)
  152.     pla("^P6None.",&abort);
  153.   nl();
  154. }
  155.  
  156. =============================================================================
  157. Thats all there is to it.  -Zy.
  158.